<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // function fun(x,y){
        //     console.log(y);
        //     console.log(x+y);
        // }
        // fun(32);

        //实参为一个对象时
        function fun2(obj){
            console.log('姓名:'+obj.name +' 性别:'+obj.gender+' 年龄:'+obj.age +' 所在地:'+obj.address)
        }
        var information={
            name:'苏凉',
            gender:'男',
            age:20,
            address:'天津'
        };

        fun2(information);
    </script>
</head>
<body>
    
</body>
</html>